class InvokeMethodDemo {
	def hello() {
		return 'hello world'
	}
	
	def invokeMethod(String methodName, Object args) {
		return "unknown method $methodName(${args.join(', ')})"
	}
}

def imd = new InvokeMethodDemo()
println imd.hello()
println imd.foo(1, 'foo')

// Sample. But MarkupBuilder is not implemented through invokeMethod directly.
import groovy.xml.MarkupBuilder

def builder = new MarkupBuilder()
builder.persons {
	person {
		name('zhang3')
		age('20')
	}
}